package com.brillilab.service.module.message.template.impl.topic;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: MainExecutorEndTopicTemp
 * @ProjectName brill_lab
 * @Description: 主执行人结束课题
 * @date 2019/5/28 9:45
 */
@Data
public class MainExecutorEndTopicTemp extends AbstractMessageTemplate {
    private String topicName;

    /**
     * 主执行人结束课题
     *
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param topicName   课题名称
     * @param referId     业务关联ID
     */
    public MainExecutorEndTopicTemp(Long labId, Long receiverId, Long labMemberId, String topicName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.MainExecutorEndTopic.getValue());
        super.setTitle("课题已被结束");
        String content = String.format("<span style='color:#F6AC2D'>%s</span>" + "<span>已完成</span>", topicName);
        super.setContent(content);
        super.setAppContent(String.format("%s已完成", topicName));
        this.labMemberId = labMemberId;
        this.topicName = topicName;
        this.referId = referId;
    }

}
